from rest_framework_jwt.views import obtain_jwt_token
from django.urls import path
from users.views import *

urlpatterns = [
    # path('login/',views.Logout.as_view()),
    path('check/username/<str:username>/',CheckUsername.as_view()),

    # 校验手机号的重复行
    path('check/mobile/<str:mobile>/',CheckMobile.as_view()),

    # 图片验证码的接口
    path("image_code/<str:uuid>/",GenImageCode.as_view()),

    # 校验图片验证码
    path("check_image_code/",CheckImageCode.as_view()),

    # 用户注册
    path("register/",Register.as_view()),

    # 用户登录
    path("login/",Login.as_view()),

    # 退出登录
    path('logout/',Logout.as_view()),

    # 用户中心， 加载用户信息
    path("user/",UserAPIVIew.as_view()),
    path('user/password/',PasswordAPIView.as_view()),

    # 用户中心，添加收获地址
    path("user/addr/",AddrAPIView.as_view()),

    # 使用rest_framework_jwt登录
    path("logint/", obtain_jwt_token),

    path("sms_code/",SmsCodeView.as_view()),
]
